package com.bosssoft.cloud.wechat;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableAsync;

@EnableAsync
@SpringBootApplication
@ServletComponentScan
@EnableConfigurationProperties
@ImportResource(locations = "classpath:dubbo-consumer.xml")
// 后续若改造成票据微服务，加下面注解配置mapper
// @MapperScan("com.bosssoft.cloud.wechat.common.dao")
public class WechatCommonApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(WechatCommonApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(WechatCommonApplication.class);
    }

}
